 import request from '@/common/request/request.js'
 import {
 	stringFormat,
  toQueryString
 } from '../utils/util.js' //组件用正则 过滤传递的参数
 
 const GET = 'GET'
 const POST = 'POST'
 const PUT = 'PUT'
 const DELETE = 'DELETE'
 
 // 提交评价咨询订单
 export function submitEvaluate(data) {
 	return request(data,"/storeUserMiniAppOrder/submitEvaluate", POST).then(res => res)
 }
 
 // 获取要评价咨询订单的详情
 export function userConselorEvaluate(data) {
 	// return request({},"/usermini/order/getOrderList"+toQueryString(data), GET).then(res => res)
 	return request(data,"/storeUserMiniAppOrder/evaluate", GET).then(res => res)
 }
 // 获取用户订单列表
 export function getOrderList(data) {
 	// return request({},"/usermini/order/getOrderList"+toQueryString(data), GET).then(res => res)
 	return request(data,"/storeUserMiniAppOrder/getOrderPage", GET).then(res => res)
 }

 export function getOrderCount(data) {
     return request(data,"/storeUserMiniAppOrder/getOrderCount", GET).then(res => res)
 }
 
 // 获取用户订单列表
 export function getOrderListByEquityKey(data) {
 	return request({},"/customer/transaction/userEquityDetail/"+toQueryString(data), GET).then(res => res)
 }
 
 
 // 获取订单评价信息
 export function getOrderCommentInfo(data) {
 	return request({},"/usermini/order/getOrderCommentInfo"+toQueryString(data), GET).then(res => res)
 }
 
 // 修改订单评论信息
 export function updateorderComment(data) {
 	return request(data, "/usermini/order/orderComment", POST).then(res => res)
 }
 
 
 
 // 获取订单选项 咨询方向
 export function consultLabelQueryTreeList(data) {
 	return request({},"/consultLabel/queryTreeList?labelType=eap_consult", GET).then(res => res)
 }
 
 export function getLabelList(data) {
   return request(
     data,
     "/label/labelList",
     GET
   )
 }
 
 
 // 获取用户默认"预约" 信息
 export function getOrderDefaultInfo(data) {
 	return request({},"/storeUser/getOrderDefaultInfo", GET).then(res => res)
 }
 

 // 获取二维码信息
 export function verifyQrInfo(data) {
 	return request(data, "/storeUser/verifyQrInfo", GET).then(res => res)
 }
 // 将微信绑定用户工作台
 export function bindWorkUser(data) {
 	return request(data, "/storeUser/bindWorkUser", GET).then(res => res)
 }
 
 // 提交预约信息
 export function saveAppointmentInfo(data) {
 	// return request(data, "/usermini/order/saveOrEditAppointmentInfo", POST).then(res => res)
 	return request(data, "/storeUserMiniAppOrder/submitBookingConsultOrder", POST).then(res => res)
 }
 
 // 查付款页面详情根据交易订单id
 export function getPayDetailById(data) {
 	return request({}, "/customer/transaction/getPayDetailById"+toQueryString(data), GET).then(res => res)
 }
 
 export function getOrderInfo(data){
   return request(data, "/storeUserMiniAppOrder/getOrderInfo", GET).then(res => res)
 }